Extending C for Checking Shape Safety
نویسندگان
چکیده
The project Safe Pointers by Graph Transformation at the University of York has developed a method for specifying the shape of pointer-data structures by graph reduction, and a static checking algorithm for proving the shape safety of graph transformation rules modelling operations on pointer structures. In this paper, we outline how to apply this approach to the C programming language. We extend ANSI C with so-called transformers which model graph transformation rules, and with shape specifications for pointer structures. For the resulting language C-GRS, we present both a translation to C and and an abstraction to graph transformation. Our main result is that the abstraction of transformers to graph transformation rules is correct in that the C code implementing transformers is compatible with the semantics of graph transformation.
منابع مشابه
Extending Type Systems in a Library Extending Type Systems in a Library Type-safe XML-processing in C++
Type systems built directly into the compiler or interpreter of a programming language cannot be easily extended to keep track of runtime invariants of new abstractions. Yet, programming with domain specific abstractions could benefit from additional static checking. This paper presents library techniques for extending the type system of C++ to support domain specific abstractions. The main con...
متن کاملAn Integrated Specification and Verification Technique for Highly Concurrent Data Structures
We present a technique for automatically verifying safety properties of concurrent programs, in particular programs which rely on subtle dependencies of local states of different threads, such as lock-free implementations of stacks and queues in an environment without garbage collection. Our technique addresses the joint challenges of infinite-state specifications, an unbounded number of thread...
متن کاملExtending type systems in a library: Type-safe XML processing in C++
Type systems built directly into the compiler or interpreter of a programming language cannot be easily extended to keep track of run-time invariants of new abstractions. Yet, programming with domain-specific abstractions could benefit from additional static checking. This paper presents library techniques for extending the type system of C++ to support domain-specific abstractions. Themain con...
متن کاملSymbolic Execution and Model Checking for Testing
Subsumption • Symbolic execution with subsumption checking – Not enough to ensure termination – An infinite number of symbolic states • Our solution – Abstraction • Store abstract versions of explored symbolic states • Subsumption checking to determine if an abstract state is re-visited • Decide if the search should continue or backtrack – Enables analysis of under-approximation of program beha...
متن کاملChecking the Shape Safety of Pointer Manipulations
We present a new algorithm for checking the shape-safety of pointer manipulation programs. In our model, an abstract, data-less pointer structure is a graph. A shape is a language of graphs. A pointer manipulation program is modelled abstractly as a set of graph rewrite rules over such graphs where each rule corresponds to a pointer manipulation step. Each rule is annotated with the intended sh...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Electr. Notes Theor. Comput. Sci.
دوره 154 شماره
صفحات -
تاریخ انتشار 2006